import { createStore } from 'vuex'
import createPersistedstate from 'vuex-persistedstate'
// v2: new Vuex.Store()
// v3: createStore
import category from './modules/category.js'
export default createStore({
  state: {
  },
  getters: {
  },
  mutations: {
  },
  actions: {
  },
  modules: {
    category
  },
  plugins: [ // 插件
    createPersistedstate({
      key: 'rabbit-v3-143', // 等同于localStorage.setItem(key, value)
      paths: ['user'] // 自动持久化的模块的名字
    })
  ]
})
